CC	= gcc
CFLAGS	= -W -Wall
DEBUG = -g
LDFLAGS	= 
LIBS = -lbfd
INCDIRS = -I/usr/include
OBJECTS = sim.o oper.o supp.o load.o mem.o


all : sim

sim : $(OBJECTS)
	$(CC) $(CFLAGS) $(DEBUG) $(INCDIRS) -o sim $(OBJECTS) $(LIBS)	
	@ctags -R
	@cscope -R -b

%.o : %.c
	$(CC) -c $(DEBUG) $<


clean : 
	@rm -rf *.o sim	
	@rm -rf tags
	@rm -rf cscope.out
